﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="yes" name="apple-touch-fullscreen">
    <meta name="data-spm" content="a215s">
    <meta content="telephone=no,email=no" name="format-detection">
    <meta content="fullscreen=yes,preventMove=no" name="ML-Config">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta content="转让变现快,提现实时到,多重保障,本息保护,账户托管至新浪支付" name="Keywords">
    <meta name="description" content="仌仌众梦" />
    <title>京东家</title>
    <link rel="stylesheet" href="<?php echo C('URL_PREFIX'); ?>css/font-awesome.min.css">
    <link rel="stylesheet" href="<?php echo C('URL_PREFIX'); ?>css/reset.css" />
    <link rel="stylesheet" href="<?php echo C('URL_PREFIX'); ?>css/style.css" />
    <script>
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "//hm.baidu.com/hm.js?15b8fcad24e065c1c30bef51ef1586b0";
      var s = document.getElementsByTagName("script")[0]; 
      s.parentNode.insertBefore(hm, s);
    })();
    </script>
</head>
<body>
<section class="bodyA"><img src="<?php echo C('URL_PREFIX'); ?>images/u0.gif" alt=""></section>
<div class="body_h">
    <p class="only-img"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/img1.jpg" alt="京东睡眠节"></p>
    <section class="gift">
        <p class="only-img"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/img2.jpg" alt="京东睡眠节"></p>
        <p class="gift-conbtn only-img" onclick="maskshow('ruleshow')"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/img4.png" alt="京东睡眠节"></p>
        <div id="ruleshow" class="gift-desc mask">
            <div class="positionrq">
                <span class="closebtn"><i class="icon-remove"></i></span>
                <h2 class="only-img"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/img13.png" alt=""></h2>
                <p><span>1）猜好友睡姿、助好友得大礼包、与猜中睡姿对错无关；</span></p>
                <p><span>2）选择一个你最喜欢的睡姿，邀请12个好友来猜，得大礼包；</span></p>
                <p><span>3）奖品:价值2000元床垫、四件套等大礼包及抱枕、毛巾、优惠券等单品，奖品种类随机发放；</span></p>
                <p><span>4）中实物奖品请详细填写中奖信息（包含省、市等信息），奖品免费邮寄；优惠券奖品直接点击领取，共10万份，先到先得；</span></p>
                <p><span>5）活动时间3月21日-24日，4月7日起陆续邮寄实物奖品，请耐心等待，因邮寄信息错误或不详导致无法收取的，将不再补发。</span></p>
            </div>
        </div>
    </section>
    <section >
        <div class="page-con">
            <p style="height: 1rem;width: 100%;"></p>
            <p class="testchose-tit only-img"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/img52.png" alt=""></p>
            <form class="radiobox" action="#" method="post">
                <ul class="result-list clearfix">
                    <li>
                        <label for="result1"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/result1.png" alt="大字仰睡"></label>
                        <input id="result1" type="radio" name="text" value="1">
                    </li>
                    <li>
                        <label for="result2"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/result2.png" alt="拳打脚踢"></label>
                        <input id="result2" type="radio" name="text" value="2">
                    </li>
                    <li>
                        <label for="result3"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/result3.png" alt="反向仰睡"></label>
                        <input id="result3" type="radio" name="text" value="3">
                    </li>
                    <li>
                        <label for="result4"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/result4.png" alt="拳打脚踢"></label>
                        <input id="result4" type="radio" name="text" value="4">
                    </li>
                    <li>
                        <label for="result5"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/result5.png" alt="侧脸趴睡"></label>
                        <input id="result5" type="radio" name="text" value="5">
                    </li>
                    <li>
                        <label for="result6"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/result6.png" alt="蜷缩侧卧"></label>
                        <input id="result6" type="radio" name="text" value="6">
                    </li>
                    <li>
                        <label for="result7"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/result7.png" alt="盖被仰睡"></label>
                        <input id="result7" type="radio" name="text" value="7">
                    </li>
                    <li>
                        <label for="result8"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/result8.png" alt="蜷缩侧卧"></label>
                        <input id="result8" type="radio" name="text" value="8">
                    </li>
                    <li>
                        <label for="result9"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/result9.png" alt="枕双手睡"></label>
                        <input id="result9" type="radio" name="text" value="9">
                    </li>
                    <li>
                        <label for="result10"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/result10.png" alt="侧身曲腿"></label>
                        <input id="result10" type="radio" name="text" value="10">
                    </li>
                    <li>
                        <label for="result11"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/result11.png" alt="翘二郎腿"></label>
                        <input id="result11" type="radio" name="text" value="11">
                    </li>
                    <li>
                        <label for="result12"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/result12.png" alt="侧身曲腿"></label>
                        <input id="result12" type="radio" name="text" value="12">
                    </li>
                </ul>
                <div class="result-mask mask">
                    <span class="closebtn"><i class="icon-remove"></i></span>
                    <p class="choose0 choosefall only-img"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/yeresult1.png" alt=""></p>
                    <p class="choose1 choosefall only-img"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/yeresult2.png" alt=""></p>
                    <p class="choose2 choosefall only-img"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/yeresult3.png" alt=""></p>
                    <p class="choose3 choosefall only-img"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/yeresult4.png" alt=""></p>
                    <p class="choose4 choosefall only-img"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/yeresult5.png" alt=""></p>
                    <p class="choose5 choosefall only-img"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/yeresult6.png" alt=""></p>
                    <p class="choose6 choosefall only-img"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/yeresult7.png" alt=""></p>
                    <p class="choose7 choosefall only-img"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/yeresult8.png" alt=""></p>
                    <p class="choose8 choosefall only-img"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/yeresult9.png" alt=""></p>
                    <p class="choose9 choosefall only-img"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/yeresult10.png" alt=""></p>
                    <p class="choose10 choosefall only-img"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/yeresult11.png" alt=""></p>
                    <p class="choose11 choosefall only-img"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/yeresult12.png" alt=""></p>
                </div>
            </form>
            <div class="reach reach2 clearfix">
                <!--<a onclick="maskshow('choosetrue')">确定提交</a>-->
                <a id="choosefalue" class="reasultchoose"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/img63.png" alt="确认提交"></a>
                <a class="float-right" href="/"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/img64.png" alt="我要参加"></a>
                <div id="choosetruet" class="chooseresult mask">
                    <div class="resultcon">
                        <span class="closebtn"><i class="icon-remove"></i></span>
                        <p class="only-img"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/ruseltt.png" alt="答对了"></p>
                        <p class="heresult"><img class="result-img" width="100%" src="<?php echo C('URL_PREFIX'); ?>images/heresult1.png" alt="他的选择"></p>
                    </div>
                </div>
                <div id="choosefaluet" class="chooseresult mask">
                    <div class="resultcon">
                        <span class="closebtn"><i class="icon-remove"></i></span>
                        <p class="only-img"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/ruseltf.png" alt="答错了"></p>
                        <p class="heresult"><img class="result-img" width="100%" src="<?php echo C('URL_PREFIX'); ?>images/heresult8.png" alt="他的选择"></p>
                    </div>
                </div>
            </div>
            <div class="page-condiv">
                <div class="progressBar">
                    <p class="progressBarbar"><span class="progressBarbaron" style="width: 75%;"></span><span class="progressBarbarnum">75%</span></p>
                    <p class="progressBarword">TA 还差 <span>10</span> 个人帮拆，就能拿到礼物啦！</p>
                </div>
                <div class="winnerslistbox">
                    <h2 class="only-img"><span><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/img9.png" alt="中奖名单"></span></h2>
                    <div class="winnerslist">
                        <ul>
                            <li>奖品:抱枕&nbsp&nbsp&nbsp&nbsp&nbsp王文华&nbsp&nbsp重庆市南岸区黄桷……&nbsp&nbsp137****7038</li>
                            <li>奖品:被子&nbsp&nbsp&nbsp&nbsp&nbsp马雪民&nbsp&nbsp河南省新乡市辉县……&nbsp&nbsp138****7286</li>
                            <li>奖品:浴巾&nbsp&nbsp&nbsp&nbsp&nbsp张明&nbsp&nbsp&nbsp&nbsp&nbsp广东省广州市南沙……&nbsp&nbsp138****5509</li>
                            <li>奖品:优惠券&nbsp&nbsp郝伟&nbsp&nbsp&nbsp&nbsp&nbsp江苏省泰州市兴化……&nbsp&nbsp&nbsp189****0261</li>
                            <li>奖品:四件套&nbsp&nbsp杜新月&nbsp&nbsp福建省三明市永安……&nbsp&nbsp&nbsp155****9027</li>
                            <li>奖品:毛巾&nbsp&nbsp&nbsp&nbsp&nbsp张清源&nbsp&nbsp广东东莞市常平镇……&nbsp&nbsp159****1635</li>
                            <li>奖品:毛巾&nbsp&nbsp&nbsp&nbsp&nbsp孙小妹&nbsp&nbsp江苏徐州铜山新区……&nbsp&nbsp158****9935</li>
                            <li>奖品:浴巾&nbsp&nbsp&nbsp&nbsp&nbsp王欢欢&nbsp&nbsp福建省泉州市晋江……&nbsp&nbsp183****1221</li>
                            <li>奖品:抱枕&nbsp&nbsp&nbsp&nbsp&nbsp赵红叶&nbsp&nbsp山东省济宁市梁山……&nbsp&nbsp138****1937</li>
                            <li>奖品:枕头&nbsp&nbsp&nbsp&nbsp&nbsp李飞飞&nbsp&nbsp北京市海淀区信息……&nbsp&nbsp187****4811</li>
                            <li>奖品:毯子&nbsp&nbsp&nbsp&nbsp&nbsp林小新&nbsp&nbsp山东省济宁市中区……&nbsp&nbsp156****8515</li>
                            <li>奖品:优惠券&nbsp&nbsp王红翔&nbsp&nbsp广西百色市田东县……&nbsp&nbsp158****7328</li>
                            <li>奖品:被子&nbsp&nbsp&nbsp&nbsp&nbsp潘玉&nbsp&nbsp&nbsp&nbsp&nbsp山东省东营市东营……&nbsp&nbsp180****1295</li>
                            <li>奖品:抱枕&nbsp&nbsp&nbsp&nbsp&nbsp陈嘉明&nbsp&nbsp广东省佛山市禅城……&nbsp&nbsp134****1571</li>
                            <li>奖品:毯子&nbsp&nbsp&nbsp&nbsp&nbsp张燕&nbsp&nbsp&nbsp&nbsp&nbsp广东省广州市花都……&nbsp&nbsp159****1631</li>
                            <li>奖品:四件套&nbsp&nbsp张欣然&nbsp&nbsp福建省泉州市鲤城……&nbsp&nbsp139****4448</li>
                            <li>奖品:浴巾&nbsp&nbsp&nbsp&nbsp&nbsp佟小莉&nbsp&nbsp贵州省凯里市开发……&nbsp&nbsp180****5168</li>
                            <li>奖品:毛巾&nbsp&nbsp&nbsp&nbsp&nbsp张凯&nbsp&nbsp&nbsp&nbsp&nbsp山东潍坊昌邑利民……&nbsp&nbsp158****5291</li>
                            <li>奖品:浴巾&nbsp&nbsp&nbsp&nbsp&nbsp周博&nbsp&nbsp&nbsp&nbsp&nbsp江苏省盐城市响水……&nbsp&nbsp137****3551</li>
                            <li>奖品:毯子&nbsp&nbsp&nbsp&nbsp&nbsp裴杰&nbsp&nbsp&nbsp&nbsp&nbsp山东省昌邑市围子……&nbsp&nbsp138****9707</li>
                            <li>奖品:代金券&nbsp&nbsp徐盼盼&nbsp&nbsp山东省潍坊市昌邑……&nbsp&nbsp135****6979</li>
                            <li>奖品:抱枕&nbsp&nbsp&nbsp&nbsp&nbsp潘春玉&nbsp&nbsp重庆市南岸区黄桷……&nbsp&nbsp158****3689</li>
                            <li>奖品:枕头&nbsp&nbsp&nbsp&nbsp&nbsp孙红星&nbsp&nbsp浙江省绍兴市柯桥……&nbsp&nbsp159****1051</li>
                        </ul>
                    </div>
                </div>
                <div class="textilezone">
                    <h2 class="only-img"><a class="only-img" href="http://wqs.jd.com/event/caixiao/321shuimianjie/index.shtml?ptag=17048.12.72"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/img11.png" alt="家纺专区"></a></h2>
                    <ul class="textilelist only-img">
                        <li><a href="http://wqs.jd.com/event/caixiao/321shuimianjie/index.shtml?ptag=17048.12.72"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/textile1.jpg" alt="家纺"></a></li>
                        <li><a href="http://wqs.jd.com/event/caixiao/321shuimianjie/index.shtml?ptag=17048.12.72"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/textile2.jpg" alt="家纺"></a></li>
                        <li><a href="http://wqs.jd.com/event/caixiao/321shuimianjie/index.shtml?ptag=17048.12.72"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/textile3.jpg" alt="家纺"></a></li>
                    </ul>
                </div>
                <p class="follow only-img"><span  onclick="maskshow('followcode')"><img width="100%" src="<?php echo C('URL_PREFIX'); ?>images/img12.png" alt=""></span></p>
            </div>
        </div>
    </section>
    <section class="maskbox"></section>
    <seciont id="followcode" class="codeimg only-img mask">
        <p>
            <span class="closebtn"><i class="icon-remove"></i></span>
            <img  src="<?php echo C('URL_PREFIX'); ?>images/code.jpg" alt="">
            <span>长按关注</span>
        </p>
    </seciont>
    <p id="tip-error"><span></span></p>
</div>
<script src="<?php echo C('URL_PREFIX'); ?>js/jquery-2.1.1.min.js"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>
    wx.config({
        debug: false, // 开启调试模式
        appId: '<?php echo $signPackage['appId']; ?>', // 必填，公众号的唯一标识
        timestamp: <?php echo $signPackage['timestamp']; ?>, // 必填，生成签名的时间戳
        nonceStr: '<?php echo $signPackage['nonceStr']; ?>', // 必填，生成签名的随机串
        signature: '<?php echo $signPackage['signature']; ?>',// 必填，签名，见附录1
        jsApiList: [
            'onMenuShareTimeline',
            'onMenuShareAppMessage',
        ]
    });
    wx.ready(function () {
        wx.onMenuShareTimeline({
            title: '<?php echo $infoPackage['title']; ?>', // 分享标题
            link: '<?php echo $infoPackage['link']; ?>', // 分享链接
            imgUrl: '<?php echo $infoPackage['imgUrl']; ?>', // 分享图标
            success: function () { 
                // 用户确认分享后执行的回调函数
            },
            cancel: function () { 
                // 用户取消分享后执行的回调函数
            }
        });
        wx.onMenuShareAppMessage({
            title: '<?php echo $infoPackage['title']; ?>', // 分享标题
            desc: '<?php echo $infoPackage['desc']; ?>', // 分享描述
            link: '<?php echo $infoPackage['link']; ?>', // 分享链接
            imgUrl: '<?php echo $infoPackage['imgUrl']; ?>', // 分享图标
            type: '', // 分享类型,music、video或link，不填默认为link
            dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
            success: function () { 
                // 用户确认分享后执行的回调函数
            },
            cancel: function () { 
                // 用户取消分享后执行的回调函数
            }
        });
    });
</script>
<script>
    window.inajax = 0;
    window.openid = "<?php echo $openid; ?>";
    window.sign = "<?php echo $sign; ?>";
    window.sid = "<?php echo I('get.sid'); ?>";
    window.guessnum=<?php echo $info['guessnum']; ?>;
    window.configNum=<?php echo C('NEED_NUM'); ?>;
    window.onload = function(){
        $("body").width($(window).width());
        $("body").css("min-height",$(window).height());
        $("#body_h").css("min-height",$(window).height());
        $(".maskbox").width($(window).width());
        $(".maskbox").height($(window).height());

        setProgressBarword(window.guessnum);

        var WIN_W = $(window).width();
        if(WIN_W < 640){
            var B = $(window).width()/320*100*0.625+"%";
            $("html").css("font-size",B);
        }else{
            var B = 640/320*100*0.625+"%";
            $("html").css("font-size",B);
        }
        $(".bodyA").hide();
    };

    var setProgressBarword = function(guessnum){
        var configNum = window.configNum;
        if(guessnum>configNum){
            guessnum = configNum;
        };
        var needNum = configNum - guessnum;
        var lineWidth = String(parseInt(100*guessnum/configNum)+"%");
        $(".progressBarbaron").width(lineWidth);
        $(".progressBarbarnum").html(lineWidth);
        $(".progressBarword span").html(needNum);
    }

    $(document).ready(function(){
        var UA=window.navigator.userAgent;  //使用设备
        var CLICK="click";
        if(/ipad|iphone|android/.test(UA)){   //判断使用设备
            CLICK="tap";
        };
        //按钮部分开始
        //确定按钮
        //关闭遮罩
        $(".closebtn")[CLICK](function(event){
            event.preventDefault();
            $(".maskbox").hide();
            $(this).parents(".mask").hide();
        });
        //点击睡姿出现遮罩代码开始
        $(".result-list li")[CLICK](function(event){
            if($(this).find("input").attr("disabled")=="disabled"){

            }else{
                var indexI = $(this).index();
                $(".maskbox").show();
                $(".result-mask").show();
                $(".choosefall").hide();
                $(".choose"+indexI).show();
            }
        });
        $(".maskbox")[CLICK](function(event){
            $(".result-mask").hide();
            $(".chooseresult").hide();
            $("#ruleshow").hide();
            $(this).hide();
        });
        $(".result-mask")[CLICK](function(event){
            $(".maskbox").hide();
            $(this).hide();
        });
        $(".chooseresult")[CLICK](function(event){
            $(".maskbox").hide();
            $(this).hide();
        });
        $("#ruleshow")[CLICK](function(event){
            $(".maskbox").hide();
            $(this).hide();
        });
        //点击睡姿出现遮罩代码结束
        //中奖名单部分开始
        $(function(){
            var $this = $(".winnerslist");
            var scrollTimer;
            $this.hover(function(){
                clearInterval(scrollTimer);
            },function(){
                scrollTimer = setInterval(function(){
                    scrollNews( $this );
                }, 2000 );
            }).trigger("mouseout");
        });
        function scrollNews(obj){
            var $self = obj.find("ul:first");
            var lineHeight = $self.find("li:first").height();
            $self.animate({ "margin-top" : -lineHeight +"px" },600 , function(){
                $self.css({"margin-top":"0px"}).find("li:first").appendTo($self);
            })
        }
        //中奖名单部分结束
        $(".reasultchoose")[CLICK](function(event){
            var IDNAME = $(this).attr('id');
            event.preventDefault();
            var val = $('input:radio[name="text"]:checked').val();
            if(val == null)
            {
                $('#tip-error span').html('请选择睡姿哦!');
                $(".maskbox").show();
                $('#tip-error').show();
                setTimeout(function(){$('#tip-error').fadeOut(500);$(".maskbox").hide();},2600);
            }else{
                //var openid = <?php echo $openid; ?>;
                if(window.inajax==1){return;};
                window.inajax = 1;
                $.getJSON("<?php echo U('Index/addGuess'); ?>", 
                    { sid: window.sid, val: val, sign: window.sign, openid: window.openid },
                    function(data){
                    if(data.err == 0){
                        
                        $(".result-img").attr("src","<?php echo C('URL_PREFIX'); ?>images/heresult"+data.id+".png");
                        if(data.right == 1){
                            $(".maskbox").show();
                            $("#choosetruet").show();
                        }else{
                            $(".maskbox").show();
                            $("#choosefaluet").show();
                        }
                        setProgressBarword(window.guessnum+1);
                    }else if(data.err == 2){
                        $('#tip-error span').html('您已经选择过了!');
                        $('#tip-error').show();
                        setTimeout(function(){$('#tip-error').fadeOut(500);},2600);
                    }else if(data.err == 1){
                        $('#tip-error span').html('服务器繁忙，请稍后再试!');
                        $('#tip-error').show();
                        setTimeout(function(){$('#tip-error').fadeOut(500);},2600);
                    }
                });
                window.inajax = 0;
            }
        });
    });
    function maskshow(name){
        $(".maskbox").show();
        $("#"+name).show();
    }
</script>
</body>
</html>
